<script setup>
	defineProps({
		title: {
			required: true,
			type: String
		}
	})
</script>
<!-- 弹窗 -->
<template>
	<el-card class="page-container">
		<!-- 插槽 -->
		<template #header>
			<div class="header">
				<!-- 传过来的标题pops接收 -->
				<span>{{ title }}</span>
				<div class="extra">
					<!-- 按钮 -->
					<slot name="extra"></slot>
				</div>
			</div>
		</template>
		<!-- 主体 -->
		<slot></slot>
	</el-card>
</template>

<style lang="scss" scoped>
	.page-container {
		min-height: 100%;
		box-sizing: border-box;
		.header {
			display: flex;
			align-items: center;
			justify-content: space-between;
		}
	}
</style>
